<?php
/**
 * Detail
 * Created by Veyron
 * motto:现在的拼搏 为了更好的明天
 * day:  2020/3/24
 * Time: 15:58
 */

namespace app\api\controller\mall;

use app\api\controller\ApiBase;
use app\common\lib\Show;
use app\common\business\Goods as GoodsBis;

class Detail extends ApiBase
{
    public function index(){
        $id = input('param.id','','intval');
        if(!$id){
            return Show::error();
        }
        $result = (new Goodsbis())->getGoodsDetailBySkuId($id);

        if(!$result){
            return Show::error();
        }

        return Show::success($result);
    }
}
